home *** CD-ROM | disk | FTP | other *** search
/ Computer Life 1997 February / Computer Life February 1997.iso / TELME / COMMS / DMODEM.SRP < prev    next >
Text File  |  1996-06-04  |  2KB  |  145 lines

  1. rem Copyright (c) PhoneLink plc
  2. rem direct connect script (24/8/95)
  3. rem Changes to version 2 include faster disconnect methods
  4. rem and general fine tuning of timeouts!
  5.  
  6. label InitDevice
  7. echo off
  8. flush
  9. echo script[56]  
  10. send "atchar(13)"  
  11. timeout 2,modem_fail
  12. find    "OK"
  13.  
  14. label OffToGate
  15. rem Offline to Gate (also contains Pad to Gate)
  16. echo off
  17. flush
  18. echo script[57]
  19. send    "at{InitModemStr}char(13)"
  20. timeout 2,modem_fail
  21. find    "OK"
  22. send   "atd{DialMode}{PreTel}{SiteTel}{PostFix}char(13)"
  23. echo script[52]...
  24. timeout {DialTimeout},connect_fail
  25. finderr 0,BUSY,busy
  26. finderr 103,NO DIALTONE,connect_fail
  27. finderr 0,NO CARRIER,no_carrier  
  28. find "CONNECT"
  29. echo script[53] 
  30. send "char(13)"   
  31. timeout 2,Bad_PadPrompt
  32. finderr 0,PAD>,Good_PadPrompt
  33. find "ZZZ"
  34. label Bad_PadPrompt
  35. echo script[58]
  36. send "char(13)"
  37. timeout 2,pad_fail
  38. find "PAD>"
  39. label Good_PadPrompt
  40. label PadToGate
  41. echo off
  42. send    "SER{SUB}char(13)"
  43. timeout 2,nua_bad1
  44. finderr 0,COM,nua_good
  45. find    "ZZZ"
  46. label nua_bad1
  47. send    "SER{SUB}char(13)"
  48. timeout 2,nua_bad2
  49. finderr 0,COM,nua_good
  50. find    "ZZZ"
  51. label nua_bad2
  52. send    "SER{SUB}char(13)"
  53. timeout 2,nua_fail
  54. find    "COM"
  55. label nua_good
  56. echo script[54].
  57. end
  58.  
  59. label GateToPad
  60. echo off
  61. send    "char(16)CLRchar(13)"
  62. timeout 2,ctrl_p_clear_fail
  63. find    "CONF"
  64. echo script[91]...
  65. end
  66.  
  67. label GateToOff
  68. label PadToOff
  69. echo off
  70. wait 1
  71. send   "+"
  72. mwait 100
  73. send   "+"
  74. mwait 100
  75. send   "+"
  76. timeout 2,hang_fail_retry
  77. find    "OK"
  78. echo script[97]
  79. wait 1
  80. send   "at{TermModemStr}char(13)"
  81. timeout 2,hang_Fail
  82. find    "OK"
  83. echo script[99].
  84. end
  85.  
  86. label modem_offline
  87. echo off
  88. wait 1
  89. send   "+"
  90. mwait 100
  91. send   "+"
  92. mwait 100
  93. send   "+"
  94. timeout 2,hang_fail_retry
  95. find    "OK"
  96. echo script[97]
  97. wait 1
  98. send   "at{TermModemStr}char(13)"
  99. timeout 2,hang_Fail
  100. find    "OK"
  101. echo script[99].
  102. abort
  103.  
  104. label hang_fail_retry
  105. send   "at{TermModemStr}char(13)" 
  106. timeout 2,hang_fail
  107. find    "OK"
  108. echo script[99].
  109. abort
  110.  
  111. label hang_fail
  112. echo script[98].
  113. dtrtoggle
  114. abort
  115.  
  116.  
  117. label modem_fail
  118. echo script[23]
  119. goto modem_offline
  120.  
  121. label connect_fail
  122. echo script[1]
  123. goto modem_offline
  124.  
  125. label busy
  126. echo script[2]
  127. goto modem_offline
  128.  
  129. label no_carrier
  130. echo script[3]
  131. goto modem_offline
  132.  
  133. label nua_fail
  134. echo script[22]
  135. goto modem_offline
  136.  
  137. label ctrl_p_clear_fail
  138. echo script[14]
  139. goto modem_offline
  140.  
  141. label command_mode_fail
  142. echo script[15]
  143. goto modem_offline
  144.  
  145.